﻿using System;
using WiMo.Games;
using System.Windows.Forms;

namespace $safeprojectname$
{
    static class Program
    {
        /// <summary>
        /// The main entry point for the application.
        /// </summary>
        [MTAThread]
        static void Main()
        {
            var gameEngine = new WiMo.Games.WM5.GameEngine();

            var formSize = new Size(gameEngine.Form.Size.Width, gameEngine.Form.Size.Height);
            var targetSize = new Size(240, 320);

            gameEngine.Display = new WiMo.Games.DirectDrawDisplay.DisplayManager(gameEngine.Form.Handle, targetSize, formSize, 96, Display.AspetRatioThreeByFour);

            gameEngine.CollisionManager = new WiMo.Games.StandardCollisions.CollisionManager(targetSize);

            gameEngine.PhysicsManager = new WiMo.Games.StandardPhysics.PhysicsManager();

            gameEngine.InputManager = new WiMo.Games.StandardInput.InputManager(gameEngine.Form, gameEngine.Display);
            gameEngine.AudioManager = new WiMo.Games.StandardAudio.AudioManager(gameEngine.ContentManager);
            gameEngine.MenuManager = new WiMo.Games.StandardMenus.MenuManager();

            var game = new Game(gameEngine);
            gameEngine.Initialize(game);
            gameEngine.Start();
            Application.Run(gameEngine.Form);
        }
    }
}